package com.kexin.service;

import com.kexin.mappers.data2.TItemMapper;
import com.kexin.pojo.TItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class TItemService {
    @Autowired
    private TItemMapper tItemMapper;
    public void insertUser(TItem tItem) {
        tItemMapper.insertSelective(tItem);

    }

    public List<TItem> getItemId(String generateString) {
        Example example =new Example(TItem.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("fnumber",generateString);
        return tItemMapper.selectByExample(example);
    }
}
